home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Educational / Henon / Source / Henon.nib (.txt) < prev    next >
Encoding:
NeXT TypedStream Data  |  1995-06-12  |  15.5 KB  |  348 lines

  1. typedstream
  2. StreamTable
  3.     HashTable
  4. Object
  5. [20c]
  6. typedstream
  7. [987c]
  8. typedstream
  9.     HashTable
  10. Object
  11.     HenonView
  12. HeaderClass
  13. %%%%i@@
  14. /usr/include/sys/message.h
  15. viewnib
  16.     incYField
  17. startXField
  18. phaseField
  19. startStopButton
  20. lField
  21. currentOrbitField
  22. rField
  23. phaseSlider
  24. pointsField
  25. tField
  26.     incXField
  27. orbitField
  28. stringTable
  29. nextOrbitButton
  30. startYField
  31. bField
  32. saveAsTIFF:
  33. appDidInit:
  34. gridChecked:
  35. setPlotValues1:
  36. setPlotValues3:
  37. setPlotValues2:
  38. nextOrbit:
  39. startStop:
  40. FirstResponder
  41. firstnib
  42. checkSpelling:
  43. alignSelCenter:
  44.     unscript:
  45. pasteFont:
  46. runPageLayout:
  47. superscript:
  48. copyRuler:
  49.     copyFont:
  50. selectAll:
  51. pasteRuler:
  52. toggleRuler:
  53. showGuessPanel:
  54. alignSelLeft:
  55. paste:
  56. performClose:
  57. arrangeInFront:
  58. subscript:
  59. copy:
  60. alignSelRight:
  61. delete:
  62. orderFrontColorPanel:
  63. underline:
  64. performMiniaturize:
  65. [14707c]
  66. typedstream
  67.     HashTable
  68. Object
  69. Bitmap
  70. theApp
  71. iii00
  72. [576c]
  73. UUUUUUUUUU
  74. NibData
  75. @@@@s
  76. Storage
  77. {*@@}
  78.     [68{*@@}]
  79. File's Owner
  80. CustomObject
  81. Application
  82. Info Panel
  83. WindowTemplate
  84. iiii***@s@
  85. Panel
  86.     Responder
  87. [13@]
  88.     TextField
  89. Control
  90. TextFieldCell
  91. ActionCell
  92.     Helvetica
  93. Version 0.9
  94. 1NeXT version (in Objective C) by Anders Bertelrud
  95. Button
  96. ButtonCell
  97. >Copyright 1990, 1991 Anders Bertelrud     All Rights Reserved.
  98. xOriginal version (in Pascal, for IBM PC) by Gordon Hughes,
  99.        see BYTE December 1986, page 161 for more information.
  100. wThis program may be copied and distributed freely in unmodified form, provided fees are neither requested nor accepted.
  101. D(please send any comments you might have
  102. to abertel@vttcf.cc.vt.edu)
  103.     _________
  104. Monday 2-18-91 @ 11:19:52pm EDT
  105. Button1
  106. Field1
  107. Field2
  108. VersionNumber
  109. Field
  110. Field4
  111. Field5
  112. Field9
  113. Field3
  114. Field10
  115. Field11
  116. Field12
  117.     Main Menu
  118. MenuTemplate
  119. *@*@ccc
  120. Henon
  121. Matrix
  122. @:@iiii
  123. MenuCell
  124. Info Panel...
  125. Help...
  126. Hints...
  127. ff@@#::s
  128. submenuAction:
  129.     menuArrow
  130. Window
  131. Save as TIFF...
  132. Interesting Maps
  133. Default
  134. Sea Creature
  135. Print...
  136. Plotter Panel
  137. non Mapper
  138. [11@]
  139. Helvetica-BoldOblique$
  140. returnSign
  141. 1.111
  142. Must be between 0 and
  143. Symbol
  144. Slider
  145. SliderCell
  146. Phase Angle
  147. Helvetica-Bold
  148. 0.098
  149. 0.061
  150. Starting Point for 1st Orbit\
  151. X & Y Increments in the Orbits\
  152. # of Orbits\
  153. Points / Orbit\
  154. Draw a grid under the plot
  155. switch
  156. switchH
  157. Miscellaneous\
  158. Window onto real # plane\
  159. Current Orbit\
  160. Next Orbit\
  161. CustomView
  162.     HenonView
  163. Title
  164. Slider2VE
  165. Help Panel
  166. ScrollView
  167. ClipView
  168. ciifffcfffs
  169. [2560c]{\rtf0\ansi{\fonttbl\f0\fnil Times-Roman;\f2\ftech Symbol;\f1\fswiss Helvetica;}
  170. \margl40
  171. \margr40
  172. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f0\b\i0\ul0\fs28         
  173. \ul Creating a H
  174. non Mapping
  175. \b0\ul0\fs24 \
  176.    A H
  177. non mapping is an area-preserving map of the plane given by\
  178. \i0 +1) = X(
  179. \i0 ) * cos 
  180. \f2\fs20 a
  181. \f0\fs24  - 
  182. \fs28 [
  183. \fs24  Y(
  184. \i0 ) - X(
  185. \i0 )
  186. \fs18\up8 2
  187. \fs24\up0  
  188. \fs28 ]
  189. \fs24  * sin 
  190. \f2\fs20 a
  191. \f0\fs24 \
  192. \i0 +1) = X(
  193. \i0 ) * sin 
  194. \f2\fs20 a
  195. \f0\fs24  + 
  196. \fs28 [
  197. \fs24  Y(
  198. \i0 ) - X(
  199. \i0 )
  200. \fs18\up6 2
  201. \fs24\up0  
  202. \fs28 ]
  203. \fs24  * cos 
  204. \f2\fs20 a
  205. \f0\fs24 \
  206.    Here, 
  207. \f2\fs20 a
  208. \f0\fs24  is a fixed constant called the phase angle.  First, choose a value for 
  209. \f2\fs20 a
  210. \f0\fs24  between 0 and 
  211. \f2\fs20 p
  212. \f0\fs24  (values outside this range are accetable, but won't obtain any new mappings).  Next, choose an initial point (X
  213. \fs18\dn6 0
  214. \fs24\dn0 , Y
  215. \fs18\dn6 0
  216. \fs24\dn0 ) and use it to compute (X
  217. \fs18\dn6 1
  218. \fs24\dn0 , Y
  219. \fs18\dn6 1
  220. \fs24\dn0 ), then (X
  221. \fs18\dn6 2
  222. \fs24\dn0 , Y
  223. \fs18\dn6 2
  224. \fs24\dn0 ), etc.  This generates one orbit of the H
  225. non mapping.  Typically, it will resemble a closed curve after a few hundred iterations.  The map called 
  226. Default
  227.  in the 
  228. Interesting Maps
  229.  menu has 
  230. \f2\fs20 a
  231. \f0\fs24  =1.111, and the inner curve has 700 points generated with a starting value of (X
  232. \fs18\dn6 0
  233. \fs24\dn0 , Y
  234. \fs18\dn6 0
  235. \fs24\dn0 ) = (.098, .061).\
  236.    Next, choose a starting point (X
  237. \fs18\dn6 0
  238. \fs24\dn0 , Y
  239. \fs18\dn6 0
  240. \fs24\dn0 ) for the second orbit and continue.\
  241. A typical mapping might contain 15 to 20 orbits, depending on the detail desired.  The map 
  242. Default
  243.  contains 38 orbits.  You can use any value for the starting point, but for X
  244. \fs18\dn6 0
  245. \fs24\dn0  > 1 / sin 
  246. \f2\fs20 a
  247. \f0\fs24 , the successive points grow rapidly. For example, with 
  248. \f2\fs20 a
  249. \f0\fs24  = 1.111, any starting point beyond X
  250. \fs18\dn6 0
  251. \fs24\dn0  = 1.116 grows quickly, and the orbit degenerates to a few points on the screen.\
  252.    A program to generate these mappings (this one, for example!) will have two nested loops: the outer loop to choose the starting values (X
  253. \fs18\dn6 0
  254. \fs24\dn0 , Y
  255. \fs18\dn6 0
  256. \fs24\dn0 ), and the inner loop to generate the orbit.\
  257.    Note that the mappings have a symmetry about a line that makes an angle of 
  258. \f2\fs20 a
  259. \f0\fs24 /2 with the positive x axis.  For the 
  260. Default
  261.  map, this angle is 1.111/2 radians, which is about 32 degrees.\
  262. \i\fs20 From BYTE, December 1986, page 170
  263. NXCursor
  264. NXImage
  265. NXibeam
  266. Scroller
  267. _doScroller:
  268. @@@ffs
  269. ScrollingText
  270. Hint Panel
  271. Hints
  272. [2043c]{\rtf0\ansi{\fonttbl\f0\fnil Times-Roman;\f1\fswiss Helvetica;}
  273. \margl40
  274. \margr40
  275. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f0\b\i0\ul\fs24 Some hints on how to use 
  276. \i0 :
  277. \b0\ul0 \
  278.   The H
  279. non map is drawn continuously, but the display is only updated between orbits.  This means that the computer appears to be inactive for long periods of time if you're plotting many points per orbit.  What it's actually doing, though, is plotting the points into an offscreen bitmap.  The bitmap gets composited to the screen at the end of every orbit.\
  280.   Values typed into the fields on the right side of the main window won't take effect immediately 
  281.  they only apply to new plots.  If you're already plotting a map, stop it first by clicking the Stop button.\
  282.   The number of the orbit that's currently being plotted is displayed in a text field on the right.  This box is for information only; you can't edit the orbit number.  You can, however, immediately skip to the next orbit by clicking the button labeled 
  283. Next Orbit
  284.   The 
  285. Interesting Maps
  286.  menu contains the plot para- meters for some interesting H
  287. non plots.  Selecting a menu item in this menu will replace the current parameters in the right hand side of the window with sample ones.  You can the click on the Plot button to start plotting using the new values.\
  288.   The mysterious-looking box labeled 
  289. Window onto real # plane
  290.  may need some explanation.  The black box represents a window onto the plane of real numbers.  This is the plane the H
  291. non map is plotted on, and it is always centered at the origin.  The word 
  292. \i window
  293. \i0  shouldn't be confused with a NeXT window 
  294.  here the word refers to the two-dimensional range of the plot.\
  295.    The text fields next to the edges allow you to change the limits of this virtual window.  The box by each each edge represents the coordinate of that boundary. For example, the white box below the lower horizontal line of the black box represents the lower 
  296. \i0  coordinate.
  297. Alert Strings
  298. NXStringTable
  299. # orbits must be int >= 1;
  300. ?Number of orbits must be an integer greater than or equal to 1.:
  301. Right must be > left;
  302. BThe right window edge must have a larger value than the left edge.:
  303. Top must be > bottom;
  304. BThe top window edge must have a larger value than the bottom edge.:
  305. FS error;
  306. File system error:
  307. Cancel;
  308. # pts/orbit must be int >= 1;
  309. INumber of points per orbit must be an integer greater than or equal to 1.:
  310. Phase angle must be 0<=a<=pi;
  311. >Phase angle must be a value between 0 and pi (3.141592654...).:
  312. Range error;
  313. Stop;
  314. Couldn't write TIFF to;
  315. &Couldn't write the TIFF image to '%s'.
  316. {i*@@@}
  317. [43{i*@@@}]
  318. hide:$
  319. terminate:&
  320. nextTexthk
  321. takeFloatValueFrom:VI
  322. startStop:=
  323. gridChecked:
  324. nextOrbit:
  325. delegate
  326. makeKeyAndOrderFront:
  327. saveAsTIFF:
  328. phaseField
  329. phaseSlider
  330. startXField
  331. startYField
  332.     incXField
  333.     incYField
  334. orbitField
  335. pointsField
  336. currentOrbitField
  337. tField
  338. lField
  339. rField
  340. bField
  341. nextOrbitButton
  342. startStopButton
  343. stringTable
  344. setPlotValues1:
  345. setPlotValues2:
  346. setPlotValues3:
  347. printPSCode:"
  348.